<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Libs\Plugins\QrCode;

class QrStr
{
    public static function set(&$srcTab, $x, $y, $repl, $replLen = false)
    {
        $srcTab[$y] = substr_replace($srcTab[$y], ($replLen !== false && is_int($replLen)) ? substr($repl, 0, $replLen) : $repl, $x, ($replLen !== false) ? $replLen : strlen($repl));
    }
}